<html>
<head><meta charset="utf-8"><title>cargo-watch · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html">cargo-watch</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="161741116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch/near/161741116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pascal <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html#161741116">(Mar 26 2019 at 08:33)</a>:</h4>
<p>hey, just tried the cargo-watch mode of ra. looks like it restarts itself because a build script is used to generate source files outside of target. is there any way to configure the command to avoid this?</p>



<a name="161741198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch/near/161741198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html#161741198">(Mar 26 2019 at 08:35)</a>:</h4>
<p>You can disable the watch task that is created by rust-analyzer and deinfe one manaully</p>



<a name="161741200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch/near/161741200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html#161741200">(Mar 26 2019 at 08:35)</a>:</h4>
<div class="codehilite"><pre><span></span>    {
      &quot;label&quot;: &quot;cargo watch&quot;,
      &quot;group&quot;: &quot;build&quot;,
      &quot;isBackground&quot;: true,
      &quot;type&quot;: &quot;shell&quot;,
      &quot;command&quot;: &quot;cargo&quot;,
      &quot;args&quot;: [
        &quot;watch&quot;
      ],
      &quot;problemMatcher&quot;: &quot;$rustc-watch&quot;
    },
</pre></div>



<a name="161741287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch/near/161741287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pascal <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html#161741287">(Mar 26 2019 at 08:36)</a>:</h4>
<p>cool, thanks, will try that!</p>



<a name="161741652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch/near/161741652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pascal <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html#161741652">(Mar 26 2019 at 08:44)</a>:</h4>
<p>Interesting. It finished (not sure if passing <code>--no-restart</code>actually helped) but it seems like the task itself keeps retriggering:</p>
<div class="codehilite"><pre><span></span>[Running &#39;cargo check&#39;]
    Finished dev [unoptimized + debuginfo] target(s) in 0.27s
[Finished running. Exit status: 0]
[Running &#39;cargo check&#39;]
    Finished dev [unoptimized + debuginfo] target(s) in 0.27s
[Finished running. Exit status: 0]
[Running &#39;cargo check&#39;]
…
</pre></div>



<a name="161741879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch/near/161741879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html#161741879">(Mar 26 2019 at 08:48)</a>:</h4>
<p>Is this because VS code starts the task, or is it something internal to <code>cargo watch</code>? (to be clear, I know nothing about <code>cargo watch</code>) :)</p>



<a name="161743685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch/near/161743685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pascal <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/cargo-watch.html#161743685">(Mar 26 2019 at 09:17)</a>:</h4>
<p>no clue. will investigate later</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>